package com.mall.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mall.common.annotation.Excel;
import com.mall.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 订单评价对象 t_order_pj
 *
 * @author ruoyi
 * @date 2025-03-30
 */
@Data
@TableName(value = "t_order_pj")
@EqualsAndHashCode(callSuper = true)
public class TOrderPj extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    /**
     * "订单Id"
     */
    @Excel(name = "订单Id")
    private String orderId;

    /**
     * "订单明细Id"
     */
    @Excel(name = "订单明细Id")
    @NotBlank
    private String orderItemId;

    /**
     * "订单编号"
     */
    @Excel(name = "订单编号")
    private String orderNo;
    /**
     * "评论内容"
     */
    @Excel(name = "评论内容")
    @NotBlank
    @Size(min = 0, max = 200, message = "评论内容不能超过200个字符")
    private String content;
    /**
     * "用户Id"
     */
    @Excel(name = "用户Id")
    private String userId;

    /**
     * "商品Id"
     */
    @Excel(name = "商品Id")
    @NotBlank(message = "商品不能为空")
    private String productId;


    /**
     * "分值"
     */
    @Excel(name = "分值")
    private Long score;

    /**
     * "商品名称"
     */
    @TableField(exist = false)
    private String productName;

    /**
     * "用户名称"
     */
    @TableField(exist = false)
    private String nickName;

    /**
     * "用户头像"
     */
    @TableField(exist = false)
    private String avatar;
}
